Skip to content

Bug 2043229 - Display a "Show External" button beneath attachments list to display all attachments that would redirect such as Github and Phabricator#2633

Open
dklawren wants to merge 4 commits into
mozilla-bteam:masterfrom
dklawren:2043229

Conversation

@dklawren

Copy link
Copy Markdown
Collaborator

No description provided.

…st to display all attachments that would redirect such as Github and Phabricator
Copilot AI review requested due to automatic review settings May 29, 2026 02:13

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a "Show External" toggle to the BugModal attachments list that hides attachments whose MIME types match a new configurable parameter (attachment_hide_content_types), defaulting to GitHub PR and Phabricator request types. External rows are rendered hidden by default and toggled by a new footer button, mirroring the existing obsolete-toggle behavior.

Changes:

  • New attachment_hide_content_types param (text list of MIME types) with sensible default in Bugzilla/Config/Attachment.pm.
  • BugModal templates count, class, and conditionally hide external attachments, and render a new "Show External" button alongside "Show Obsolete".
  • BugModal JS refactors the obsolete toggle into shared state plus a new external toggle in updateAttachmentRows().

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
Bugzilla/Config/Attachment.pm Adds the attachment_hide_content_types parameter with default GitHub/Phabricator types.
extensions/BugModal/template/en/default/bug_modal/edit.html.tmpl Parses the param, counts external attachments, and forwards them to the attachments include.
extensions/BugModal/template/en/default/bug_modal/attachments.html.tmpl Tags rows with attach-external, hides them by default, and adds the "Show External" button.
extensions/BugModal/web/bug_modal.js Replaces single-state obsolete toggle with combined obsolete/external state and toggle handlers.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread extensions/BugModal/web/bug_modal.js
Comment thread Bugzilla/Config/Attachment.pm
Comment thread extensions/BugModal/template/en/default/bug_modal/edit.html.tmpl
@dklawren dklawren requested a review from cgsheeh May 29, 2026 16:19
@dklawren dklawren added the UX Issues related to UX enhancements label Jun 3, 2026
@dklawren dklawren requested a review from Copilot June 8, 2026 21:00

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Comment thread extensions/BugModal/web/bug_modal.js
Comment thread template/en/default/admin/params/attachment.html.tmpl
dklawren and others added 2 commits June 8, 2026 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

UX Issues related to UX enhancements

Development

Successfully merging this pull request may close these issues.

2 participants